import request from '@/utils/request'
/**
 * 注册
 *@param {username,password} data
 *@
 *
 *
 */
export const register = (data) => {
  return request({
    method: 'post',
    url: '/user/register',
    data
  })
}
export const login = (data) => {
  return request({
    method: 'post',
    url: '/user/login',
    data
  })
}

// 获取用户信息
export const getUserInfo = () => {
  return request('/user/currentUser')
}
